package com.qf.controller;

import com.qf.service.OrderService;
import com.qf.utils.R;
import com.qf.vo.OrderVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zdl
 * @date 2025/2/13
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private OrderService orderService;

    @GetMapping("/{oid}")
    public R<OrderVo> findOrderWithUserByOid(@PathVariable int oid){
        OrderVo orderWithUserByOid = orderService.findOrderWithUserByOid(oid);
        return R.ok(orderWithUserByOid);
    }
}
